// nav部分遮盖
$('.nav').mouseenter(function () {
    $('.cloth1').slideDown();
})
$('.cloth1').mouseleave(function () {
    $(this).slideUp();
})

// 下载按钮旋转
$('.mxd_download').addClass("item");
$('.mxd_download').mouseenter(function () {
    
   if($(this).hasClass("item")){
    
    $(this).css("transition", "transform 0.2s ");
    $(this).css("transformOrigin", "center center");
    $(this).css("transform", "rotateY(90deg)")
    setTimeout(function () {
        $('.mxd_download').removeClass("item");
        $('.mxd_download').css("transform", "rotateY(-90)");
        $('.mxd_download').css("transition", "transform 0.2s ");
        $('.mxd_download').css("transformOrigin", "center center");
        $('.mxd_download').css("transform", "rotateY(0deg)")
    }, 200)
    setTimeout(function () {
        $('.mxd_download').css("transition", "transform 0.2s ");
        $('.mxd_download').css("transformOrigin", "center center");
        $('.mxd_download').css("transform", "rotateY(50deg)")
    }, 400)
    setTimeout(function () {
        $('.mxd_download').css("transition", "transform 0.2s ");
        $('.mxd_download').css("transformOrigin", "center center");
        $('.mxd_download').css("transform", "rotateY(-20deg)")
    }, 600)
    setTimeout(function () {
        $('.mxd_download').css("transition", "transform 0.2s ");
        $('.mxd_download').css("transformOrigin", "center center");
        $('.mxd_download').css("transform", "rotateY(0deg)");
        $('.mxd_download').addClass("item");
    }, 800)
   }
})

// banner中间部分tab切换
$('#myTabs a').click(function (e) {
    e.preventDefault()
    $(this).tab('show')
})
$('#myTabs a[href="#profile"]').tab('show') // Select tab by name
$('#myTabs a:first').tab('show') // Select first tab
$('#myTabs a:last').tab('show') // Select last tab
$('#myTabs li:eq(2) a').tab('show') // Select third tab (0-indexed)

// banner右边部分轮播图
$('.carousel').carousel({
    interval: 4000
})

//左边 微信 微博 tab切换
$('.other_wx_wb_up_l').click(function () {
    $(this).css("backgroundPosition", "0px 0px");
    $(".other_wx_wb_up_r").css("backgroundPosition", "-126px 0px");
    $('.other_wx_wb_down').css("background", "url('img/ewm1.jpg')");
})
$('.other_wx_wb_up_r').click(function () {
    $(this).css("backgroundPosition", "-126px -48px");
    $(".other_wx_wb_up_l").css("backgroundPosition", "0px -48px");
    $('.other_wx_wb_down').css("background", "url('img/ewm2.jpg')");

})

// banner_m    轮播图
var index = 0;
setInterval(function () {
    $('#uu>li:eq(' + index + ')').fadeIn(600).siblings().fadeOut(600);
    index++;
    if (index == 4) {
        index = 0;
    }
}, 3000)

var mySwiper = new Swiper('.swiper-container', {
    pagination: '.swiper-container',

    loop: true, // 循环模式选项
    autoplay: true,
    // 如果需要前进后退按钮
    navigation: {
        nextEl: '.swiper-button-next',
        prevEl: '.swiper-button-prev',
    },

})
// tv轮播图

$('.tv_l').click(function () {
    $('#tv_uu').css("transition", "transform 1s ");

    $('#tv_uu').css("transform", "translateX(-530px)")
})
$('.tv_r').click(function () {
    $('#tv_uu').css("transition", "transform 1s ");

    $('#tv_uu').css("transform", "translateX(0)")
})


//品克缤动画 
$('.pkb').mouseenter(function () {
    $(this).css("transition", "left 0.5s")
    $(this).css("left", "-17px")
})
$('.pkb').mouseleave(function () {
    $(this).css("transition", "left 0.5s")
    $(this).css("left", "-77px")
})


// footer轮播图
setInterval(function () {
    $('.foot_banner').children().css("transform", "translateX(-" + index + "px )");
    index++;
    if (index == 2220) {
        index = 0;

    }
}, 50)